package HospitalApplication;

import java.util.Scanner;

public class MainMenu {
	
	DoctorApplications dApp = new DoctorApplications();
	PatientApplication pApp = new PatientApplication();
	RandezvousApplications rApp = new RandezvousApplications();
	
	
	public static void printMenu() {
		System.out.println("Press 1 to add a new doctor");
		System.out.println("Press 2 to add a new patient");
		System.out.println("Press 3 to add a new randezvous");
		System.out.println("Press 4 to print all doctors");
		System.out.println("Press 5 to print all patients");
		System.out.println("Press 6 to print all randezvouses");

	}
	
	
	public static int getEntry() {
		Scanner sc = new Scanner(System.in);
		printMenu();
		return Integer.parseInt(sc.nextLine());
	}
	
	public void start() {
		switch (getEntry()) {
		case 1 : dApp.add((new Doctor()).createDoctor()); break;
		case 2 : pApp.add((new Patient()).createPatient()); break;
		case 3 : rApp.add((new Randezvous()).createRandezvous()); break;
		case 4 : dApp.printAll(); break;
		case 5 : pApp.printAll(); break;
		case 6 : rApp.printAll(); break;
		default : System.out.println("Wrong Entry");
		}
	}
}
